<?php

namespace yiike\store\models;

use Yii;
use \yiike\store\models\base\Goods as BaseGoods;
use yii\helpers\ArrayHelper;

/**
 * This is the model class for table "ims_ttyc_goods".
 */
class Goods extends BaseGoods
{
    public $tags;
    public $imgarr;
    public $province;
    public $city;
    public $district;
    public $shareImg;
    public $param_name;
    public $param_val;
    public $spec_img;

    public $status_option = ['' => '',  0 => '已下架', 1 => '已上架'];

    public function behaviors()
    {
        return ArrayHelper::merge(
            parent::behaviors(),
            [
                # custom behaviors
            ]
        );
    }

    public function rules()
    {
        return ArrayHelper::merge(
            parent::rules(),
            [
                # custom validation rules
            ]
        );
    }

    public function beforeSave($insert)
    {
        $this->weid = 2;
        return parent::beforeSave($insert); // TODO: Change the autogenerated stub
    }

    public function delete()
    {
        return false;
    }

    public static function find() {
        $find = parent::find();

        return $find;
    }
}
